<template>
  <view class="page">
    <view class="header">老师入驻申请</view>
    <view class="form">
      <input class="inp" v-model="name" placeholder="姓名" />
      <input class="inp" v-model="phone" placeholder="联系电话" />
      <textarea class="ta" v-model="intro" placeholder="个人简介与擅长" />
      <button class="btn" @click="submit">提交申请</button>
    </view>
    <view class="tip">审核通过后可发布课程</view>
  </view>
</template>

<script setup lang="ts">
import { ref } from 'vue';

const name = ref('');
const phone = ref('');
const intro = ref('');

const submit = () => {
  if (!name.value || !phone.value) {
    uni.showToast({ title: '请完整填写', icon: 'none' });
    return;
  }
  uni.showToast({ title: '已提交', icon: 'success' });
  setTimeout(() => uni.navigateBack(), 800);
};
</script>

<style lang="scss">
.page { min-height: 100vh; background: #314039; }
.header { padding: 24rpx; font-size: 32rpx; font-weight: 600; }
.form { margin: 20rpx; background: #fff; border-radius: 16rpx; padding: 24rpx; display: flex; flex-direction: column; gap: 16rpx; }
.inp { background: #f7f7f7; border-radius: 12rpx; padding: 24rpx; }
.ta { background: #f7f7f7; border-radius: 12rpx; padding: 24rpx; height: 200rpx; }
.btn { margin-top: 8rpx; }
.tip { text-align: center; color: #999; padding: 12rpx; }
</style>


